import React from 'react';
import { Button } from 'antd';
/* eslint-disable */

const btns = [
  { key: 'draft', text: '我的草稿' },
  { key: 'initiator', text: '我发起的' },
  { key: 'handle', text: '我参与的' },
  { key: 'all', text: '全部任务' },
];
const NoticeFilter = ({ value, onChange }) =>
  <div className="web-page-header-search-item">
    <Button.Group >
      {
        btns.map(item => {
          if (item.key === value) {
            return <Button key={item.key} type="primary">{item.text}</Button>
          } else {
            return <Button key={item.key} onClick={() => onChange(item.key)}>{item.text}</Button>
          }
        })
      }
    </Button.Group>
  </div>
export default NoticeFilter;
